package com.example.Utils;

import com.example.pojo.User;

public class UserHolder {

    private static final ThreadLocal<User> t = new ThreadLocal<>();

    public static void saveUser(User user){
        t.set(user);
    }

    public static User getUser(){
        return t.get();
    }

    public static void removeUser(){
        t.remove();
    }

}
